<template>
    <div class="info" @click="$router.push('/detail?id='+info.id)">
        <div><img :src="info.picture" alt=""></div>
        <p>{{info.name}}</p>
        <p>{{info.desc}}</p>
        <p>{{info.price}}</p>
    </div>
</template>

<script>
export default {
    props:['info']
}
</script>

<style lang="scss" scoped>
    .info{
        width: 240px;
        padding-left: 30px;
        padding-right: 30px;
        padding-top: 20px;
        padding-bottom: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        img{
            width: 160px;
            height: 160px;
        }
        p{
            width: 60%;
            overflow: auto;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }
    .info:hover{
        transform: translateY(-3px);
        border: 1px solid gray;
    }
</style>